package org.kotboot.ctrl

import org.kotboot.module.R
import org.kotboot.service.CommodityDetailServ
import org.slf4j.LoggerFactory
import org.springframework.web.bind.annotation.PathVariable
import org.springframework.web.bind.annotation.RequestMapping
import org.springframework.web.bind.annotation.RestController
import javax.annotation.Resource

@RestController
@RequestMapping(value = "/commodity/detail")
class CommodityDetailCtrl(

        @Resource val commodityDetailServ: CommodityDetailServ

) : BaseCtrl() {

    val log = LoggerFactory.getLogger(CommodityDetailCtrl::class.java)

    @RequestMapping("/{commodityid}")
    fun list(@PathVariable commodityid: Long?): R<*>? {
        return commodityDetailServ.ById(commodityid)
    }

}
